package com.karry.commons.base;

import com.karry.commons.Constants;
import com.karry.yl.domain.baseinfo.Organization;
import com.karry.yl.domain.system.User;
import org.springframework.web.bind.annotation.ModelAttribute;

import javax.servlet.http.HttpSession;

public class SuperController {
    protected User currentUser;  //当前登录用户
    protected Organization currOrganization; // 当前机构

    @ModelAttribute
    public void initParam(HttpSession session){
        this.currentUser = (User)session.getAttribute(Constants.SK_USER);
        this.currOrganization = (Organization)session.getAttribute(Constants.SK_JG);
    }
}
